﻿<%@ Page Title="" Language="C#" MasterPageFile="~/phone/OAMobi.Master" AutoEventWireup="true" CodeBehind="ToDoList.aspx.cs" Inherits="ZX.WebApp.Phone.ToDoList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
<script type="text/javascript">
    function CreateTaskHtml(data, num) {
        var obj = $.parseJSON(data);
        var str = "";
        for (var i = 0, len = obj.length; i < len; i++) {
            {
                str += "<div class='list-group-item'>";
                str += "<h4  class='list-group-item-heading'><a href='AutoView.aspx?title=" + obj[i].FlowInstanceCaption + "&OperatorInstanceId=" + obj[i].OperatorInstanceId + "'>" + subCaption(obj[i].FlowInstanceCaption) + "<span >" + i + "</span></a></h4>";
                str += "</div>";
            }
        }
        return str;
    }

    //获取我的申请列表
    function fnLoadData() {
        $.ajax({
            type: 'POST',
            url: 'Proc/GetData.ashx',
            headers: {},
            dataType: 'html',
            data: { TYPE: "GetWFItemList", PARA: "" },
            success: function (data) {
                //$("#main").html(CreateTaskHtml(data));
                $("#main").append(CreateTaskHtml(data));
                //$("#main").listview("refresh");
            },
            error: function (err) { alert("网络不可用或账号信息过时，请重新登录"); }
        });
    }

    //加载的时候显示数据
    $(fnLoadData());


     </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
<div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<div class="list-group" id="main">
				 <a href="index.aspx" class="list-group-item active">首页</a>
				<div class="list-group-item">
					我的待办列表
				</div>				
			</div>
            <div class="list-unstyled">				 
				<div class="list-group-item" onclick="fnLoadData()" style="cursor:pointer">
					 点击显示更多
				</div>
				
			</div>
		</div>
	</div>
</div>
</asp:Content>
